# 作业：
# 1、给定一个列表： [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# 1.1、取出第六个的值
# list1 = [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# print(list1[5])
# 1.2、判断，如果列表中的值是561231561，则输出：今天你猜对了哦~~~~
# list1 = [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# for i in list1:
#     if i == 561231561:
#         print("今天你猜对了哦~~~~")
# 1.3、取出这个列表里面所有的偶数，创建空列表，使用append方法，添加到新的列表里
# list1 = [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# new = []
# for num in list1:
#     if num%2==0:
#         new.append(num)
# print(new)
# 2、定义集合，使用for遍历访问元素
# set1 ={11,22,33,44}
# for i in set1:
#     print(i)
# 3、定义字符串，使用for遍历访问元素
# str1 = "a赵7"
# for i in str1:
#     print(i)
# 4、定义字典，使用for遍历访问元素
# dict1 = {"姓名":"赵俊博","年龄":"22"}
# for i in dict1:
#     print(type(dict1))
#     print(i)
# 5、定义列表，使用for遍历访问元素
# list1 = [1,2,3,4]
# for i in list1:
#     print(i)
# 6、遍历：{465,84564,5641,21564,1891563,481564,651,"刘闯","王李","李四","王三"}
# set1 = {465,84564,5641,21564,1891563,481564,651,"刘闯","王李","李四","王三"}
# for i in set1:
#     print(i)
# 6.1、使用for循环遍历上面的集合，如果输出到了刘闯，则循环结束
# set1 = {465,84564,5641,21564,1891563,481564,651,"刘闯","王李","李四","王三"}
# for i in set1:
#     if i == "刘闯":
#         print(i)
#         break
# 7、以上作业，运行的时候使用断点查看代码运行过程
# 8、以上作业，需要咱们17期git仓库里面去写，之后使用git命令上传代码。（每个人上传代码，要有一个目录专门存放自己的作业）
# 给一个列表：[123,456,789,15231,596489,123,456,12389,123]
# 取出偶数位的数，并加到一个新的列表里面
# list1 = [123,456,789,15231,596489,123,456,12389,123]
# new = []
# for i in range(len(list1)):
#     if i%2== 1:
#         new.append(list1[i])
# print(new)
